home *** CD-ROM | disk | FTP | other *** search
- /* National Institute of Standards and Technology (NIST)
- /* National Computer System Laboratory (NCSL)
- /* Office Systems Engineering (OSE) Group
- /* ********************************************************************
- /* D I S C L A I M E R
- /* (March 8, 1989)
- /*
- /* There is no warranty for the NIST NCSL OSE SGML parser and/or the NIST
- /* NCSL OSE SGML parser validation suite. If the SGML parser and/or
- /* validation suite is modified by someone else and passed on, NIST wants
- /* the parser's recipients to know that what they have is not what NIST
- /* distributed, so that any problems introduced by others will not
- /* reflect on our reputation.
- /*
- /* Policies
- /*
- /* 1. Anyone may copy and distribute verbatim copies of the SGML source
- /* code as received in any medium.
- /*
- /* 2. Anyone may modify your copy or copies of SGML parser source code or
- /* any portion of it, and copy and distribute such modifications provided
- /* that all modifications are clearly associated with the entity that
- /* performs the modifications.
- /*
- /* NO WARRANTY
- /* ===========
- /*
- /* NIST PROVIDES ABSOLUTELY NO WARRANTY. THE SGML PARSER AND VALIDATION
- /* SUITE ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
- /* EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
- /* THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
- /* WITH YOU. SHOULD THE SGML PARSER OR VALIDATION SUITE PROVE DEFECTIVE,
- /* YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
- /*
- /* IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL NIST BE LIABLE FOR
- /* DAMAGES, INCLUDING ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL,
- /* INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
- /* INABILITY TO USE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
- /* BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A
- /* FAILURE OF THE PROGRAM TO OPERATE WITH PROGRAMS NOT DISTRIBUTED BY
- /* NIST) THE PROGRAM, EVEN IF YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF
- /* SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY.
- */
-
- /************************************************************************/
- /* TITLE: SGML Parser */
- /* SYSTEM: Document Processor */
- /* SUBSYSTEM: */
- /* SOURCE FILE: DIGLOBAL.H */
- /* AUTHOR: Steve Lindeman, Fred Maples */
- /* */
- /* DATE CREATED: */
- /* LAST MODIFIED: */
- /* */
- /* REVISIONS */
- /* WHEN WHO WHY */
- /************************************************************************/
- /*global*/ int main();
- /*global*/ enum status dooperator();
- /*global*/ enum status dooperand();
- /*global*/ enum status doterminal();
- /*global*/ enum status exe_new_conmod();
- /*global*/ enum status exe_and();
- /*global*/ enum status exe_or();
- /*global*/ enum status exe_seq();
- /*global*/ enum tknretval gettoken();
- /*global*/ enum tknretval get_starttag();
- /*global*/ int get_attrvalue();
- /*global*/ void resolve_endtag();
- /*global*/ struct stentry *perform_roottag_mini();
- /*global*/ void resolve_starttag();
- /*global*/ void solveand();
- /*global*/ enum status traverse();
- /*global*/ struct attrdesc *buildattr();
- /*global*/ struct exceptdesc *build_except();
- /*global*/ struct entitydesc *build_entity();
- /*global*/ struct groupdesc *buildgroup();
- /*global*/ int build_table();
- /*global*/ struct tnode *buildtree();
- /*global*/ int resolve_attr();
- /*global*/ void output_with_lb();
- /*global*/ struct tnode *expand_any();
- /*global*/ void fillup();
- /*global*/ void fillup2();
- /*global*/ int getdelim();
- /*global*/ enum status getcdata();
- /*global*/ enum status getpcdata();
- /*global*/ enum status check_for_mdo();
- /*global*/ enum status getrcdata();
- /*global*/ void get_marked_section();
- /*global*/ int get_name();
- /*global*/ int get_entname();
- /*global*/ int get_nutoken();
- /*global*/ int get_nmtoken();
- /*global*/ int get_number();
- /*global*/ void get_pi();
- /*global*/ int get_status_keyword();
- /*global*/ void init();
- /*global*/ void cat_exit();
- /*global*/ void check_entity();
- /*global*/ void checkopt();
- /*global*/ void check_fixed();
- /*global*/ struct tnode *createcm();
- /*global*/ void change_trees();
- /*global*/ void change_excepts();
- /*global*/ struct id_idref_desc *cross_id_idref();
- /*global*/ void delete();
- /*global*/ struct attrdesc *find_attr();
- /*global*/ struct groupdesc *find_group();
- /*global*/ int find_id();
- /*global*/ struct entitydesc *find_entity();
- /*global*/ int find_except();
- /*global*/ enum status get_cdata_ms();
- /*global*/ void get_close();
- /*global*/ int gettilnosep();
- /*global*/ void insert();
- /*global*/ struct exceptdesc *last_sublist();
- /*global*/ struct exceptdesc *last_global();
- /*global*/ struct stentry *lookstack();
- /*global*/ void mycat();
- /*global*/ int nullfnc();
- /*global*/ int our_fgetc();
- /*global*/ void our_ungetc();
- /*global*/ int our_toupper();
- /*global*/ int process_attr();
- /*global*/ void try_entref();
- /*global*/ struct attrdesc *adalloc();
- /*global*/ struct out_queue *oqalloc();
- /*global*/ void change_right();
- /*global*/ void check_cr();
- /*global*/ int compare();
- /*global*/ void decroi();
- /*global*/ void delete_files();
- /*global*/ struct exceptdesc *exalloc();
- /*global*/ void flush_buf();
- /*global*/ struct entitydesc *gealloc();
- /*global*/ char *get_char_mem();
- /*global*/ void get_ms_closes();
- /*global*/ struct groupdesc *gralloc();
- /*global*/ struct id_idref_desc *id_idref_alloc();
- /*global*/ void incroi();
- /*global*/ int inputps();
- /*global*/ void inpcomment();
- /*global*/ struct input_stack *isalloc();
- /*global*/ struct stentry *linsrch();
- /*global*/ void ourexit();
- /*global*/ void place_in_queue();
- /*global*/ void empty_queue();
- /*global*/ void clear_queue();
- /*global*/ void push();
- /*global*/ struct stentry *pop();
- /*global*/ struct stentry *popfree();
- /*global*/ struct tnode *pushcreate();
- /*global*/ void putchar_outbuf();
- /*global*/ void putstr_outbuf();
- /*global*/ void reduceoi();
- /*global*/ void restoreoi();
- /*global*/ int req_not_proc();
- /*global*/ void reslvpref();
- /*global*/ int save_crs();
- /*global*/ void software_fault();
- /*global*/ struct tnode *talloc();
- /*global*/ enum occurind testoi();
- /*global*/ void unget_entity();
- /*global*/ void unget_string();
- /*global*/ void ungettoken();
- /*global*/ void unprocess();
- /*global*/ void semantics();
-
- extern STENTRY *stack[TAGLVL],*holdtp,*symtable;
- extern int sp,holdtoken,rootid,numsym;
- extern unsigned num_open_ms;
- extern READ_STATE state;
- extern int bufptr;
- extern int (*print_ctr)(),(*put_ctr)(),(*our_fprintf)(),(*our_fputc)();
- extern void (*applic)();
- extern int entitylevel,fpindx;
- extern ID_IDREF_DESC *idhead,*idrefhead;
- extern OUT_QUEUE *head;
- extern char outbuf[TAGLEN+201];
- extern EXCEPTDESC *currexcl,*currincl;
- extern INPUT_STACK *stptr;
- extern BOOLEAN open_cdata_ms,open_rcdata_ms,dontcare;
- extern FILE *indoc; /* file ptr of input & output document */
- extern FILE *fpstack[ENTLVL],*ctrfp;
- extern STENTRY *entstack[ENTLVL];
- extern char *ctrfile;
- extern char lastread_tag[NAMELEN+3];
- extern char error_msg[ERRMSGLEN];
-